package com.xjy.spring.thrift.config;

import java.io.Serializable;

/**
 * thrift server 配置
 *
 * @author xujieyang
 */
public class ThriftServerConfig<T> extends BaseServerConfig implements Serializable {
    // thrift生成的service的实现类
    private T service;
    // thrift生成的service的包名
    private String thriftServicePackageName;

    public ThriftServerConfig() {

    }

    public ThriftServerConfig(String host, Integer port, T service, String thriftServicePackageName) {
        super(host, port);
        this.service = service;
        this.thriftServicePackageName = thriftServicePackageName;
    }

    public T getService() {
        return service;
    }

    public void setService(T service) {
        this.service = service;
    }

    public String getThriftServicePackageName() {
        return thriftServicePackageName;
    }

    public void setThriftServicePackageName(String thriftServicePackageName) {
        this.thriftServicePackageName = thriftServicePackageName;
    }

    @Override
    public String toString() {
        return super.toString() + "\nThriftServerConfig{" +
                "service=" + service +
                ", thriftServicePackageName='" + thriftServicePackageName + '\'' +
                '}';
    }
}
